package ch.ethz.fcl.listener;

import ch.ethz.fcl.draw.RangeSeekBar.OnRangeSeekBarChangeListener;
import ch.ethz.fcl.udp.UDPClient;

public class TimerListener implements OnRangeSeekBarChangeListener<Integer>{
	private String timer;
	private String msg = "MetroBuzz:Timer:";
	private UDPClient client;
	
	public TimerListener(String timer){
		this.timer = timer;
		client = new UDPClient();
	}
	@Override
	public void rangeSeekBarValuesChanged(Integer minValue, Integer maxValue) {
		client.setMessage(msg + timer + ":" + minValue + ":"+ maxValue);
		client.run();
	}
}
